<?php

class LoginPortlet extends TTemplateControl
{
	public function onLoad($param)
	{
		parent::onLoad($param);
	}
	
	public function validateUser($sender,$param)
	{
		$authManager = $this->Application->Modules['auth'];
		if(!$authManager->login($this->Username->Text,$this->Password->Text))
			$param->IsValid=false;
		else
			$this->Response->redirect($this->Service->constructUrl('Home'));
	}
	
	public function loginButtonClicked($sender,$param)
	{
	}
}

?>